import 'package:flutter_frame/generated/json/base/json_convert_content.dart';
import 'package:flutter_frame/app/data/entities/auth/user_data_entity.dart';

UserDataEntity $UserDataEntityFromJson(Map<String, dynamic> json) {
	final UserDataEntity userDataEntity = UserDataEntity();
	final String? accessToken = jsonConvert.convert<String>(json['access_token']);
	if (accessToken != null) {
		userDataEntity.accessToken = accessToken;
	}
	final String? tokenType = jsonConvert.convert<String>(json['token_type']);
	if (tokenType != null) {
		userDataEntity.tokenType = tokenType;
	}
	final int? expiresIn = jsonConvert.convert<int>(json['expires_in']);
	if (expiresIn != null) {
		userDataEntity.expiresIn = expiresIn;
	}
	final String? scope = jsonConvert.convert<String>(json['scope']);
	if (scope != null) {
		userDataEntity.scope = scope;
	}
	final UserDataSystemUser? systemUser = jsonConvert.convert<UserDataSystemUser>(json['systemUser']);
	if (systemUser != null) {
		userDataEntity.systemUser = systemUser;
	}
	final String? jti = jsonConvert.convert<String>(json['jti']);
	if (jti != null) {
		userDataEntity.jti = jti;
	}
	return userDataEntity;
}

Map<String, dynamic> $UserDataEntityToJson(UserDataEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['access_token'] = entity.accessToken;
	data['token_type'] = entity.tokenType;
	data['expires_in'] = entity.expiresIn;
	data['scope'] = entity.scope;
	data['systemUser'] = entity.systemUser?.toJson();
	data['jti'] = entity.jti;
	return data;
}

UserDataSystemUser $UserDataSystemUserFromJson(Map<String, dynamic> json) {
	final UserDataSystemUser userDataSystemUser = UserDataSystemUser();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		userDataSystemUser.id = id;
	}
	final String? username = jsonConvert.convert<String>(json['username']);
	if (username != null) {
		userDataSystemUser.username = username;
	}
	final String? nickname = jsonConvert.convert<String>(json['nickname']);
	if (nickname != null) {
		userDataSystemUser.nickname = nickname;
	}
	final String? otherUid = jsonConvert.convert<String>(json['otherUid']);
	if (otherUid != null) {
		userDataSystemUser.otherUid = otherUid;
	}
	final String? password = jsonConvert.convert<String>(json['password']);
	if (password != null) {
		userDataSystemUser.password = password;
	}
	final String? email = jsonConvert.convert<String>(json['email']);
	if (email != null) {
		userDataSystemUser.email = email;
	}
	final String? mobile = jsonConvert.convert<String>(json['mobile']);
	if (mobile != null) {
		userDataSystemUser.mobile = mobile;
	}
	final int? status = jsonConvert.convert<int>(json['status']);
	if (status != null) {
		userDataSystemUser.status = status;
	}
	final dynamic createTime = jsonConvert.convert<dynamic>(json['createTime']);
	if (createTime != null) {
		userDataSystemUser.createTime = createTime;
	}
	final dynamic modifyTime = jsonConvert.convert<dynamic>(json['modifyTime']);
	if (modifyTime != null) {
		userDataSystemUser.modifyTime = modifyTime;
	}
	final String? lastLoginTime = jsonConvert.convert<String>(json['lastLoginTime']);
	if (lastLoginTime != null) {
		userDataSystemUser.lastLoginTime = lastLoginTime;
	}
	final String? sex = jsonConvert.convert<String>(json['sex']);
	if (sex != null) {
		userDataSystemUser.sex = sex;
	}
	final String? avatar = jsonConvert.convert<String>(json['avatar']);
	if (avatar != null) {
		userDataSystemUser.avatar = avatar;
	}
	final int? isSystem = jsonConvert.convert<int>(json['isSystem']);
	if (isSystem != null) {
		userDataSystemUser.isSystem = isSystem;
	}
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		userDataSystemUser.description = description;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		userDataSystemUser.type = type;
	}
	final String? sign = jsonConvert.convert<String>(json['sign']);
	if (sign != null) {
		userDataSystemUser.sign = sign;
	}
	final dynamic createDate = jsonConvert.convert<dynamic>(json['createDate']);
	if (createDate != null) {
		userDataSystemUser.createDate = createDate;
	}
	final dynamic updateDate = jsonConvert.convert<dynamic>(json['updateDate']);
	if (updateDate != null) {
		userDataSystemUser.updateDate = updateDate;
	}
	final dynamic createBy = jsonConvert.convert<dynamic>(json['createBy']);
	if (createBy != null) {
		userDataSystemUser.createBy = createBy;
	}
	final dynamic updateBy = jsonConvert.convert<dynamic>(json['updateBy']);
	if (updateBy != null) {
		userDataSystemUser.updateBy = updateBy;
	}
	final String? departmentId = jsonConvert.convert<String>(json['departmentId']);
	if (departmentId != null) {
		userDataSystemUser.departmentId = departmentId;
	}
	final int? isViewAll = jsonConvert.convert<int>(json['isViewAll']);
	if (isViewAll != null) {
		userDataSystemUser.isViewAll = isViewAll;
	}
	final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
	if (companyCode != null) {
		userDataSystemUser.companyCode = companyCode;
	}
	final dynamic areaCode = jsonConvert.convert<dynamic>(json['areaCode']);
	if (areaCode != null) {
		userDataSystemUser.areaCode = areaCode;
	}
	final String? roleId = jsonConvert.convert<String>(json['roleId']);
	if (roleId != null) {
		userDataSystemUser.roleId = roleId;
	}
	final String? roleName = jsonConvert.convert<String>(json['roleName']);
	if (roleName != null) {
		userDataSystemUser.roleName = roleName;
	}
	return userDataSystemUser;
}

Map<String, dynamic> $UserDataSystemUserToJson(UserDataSystemUser entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['username'] = entity.username;
	data['nickname'] = entity.nickname;
	data['otherUid'] = entity.otherUid;
	data['password'] = entity.password;
	data['email'] = entity.email;
	data['mobile'] = entity.mobile;
	data['status'] = entity.status;
	data['createTime'] = entity.createTime;
	data['modifyTime'] = entity.modifyTime;
	data['lastLoginTime'] = entity.lastLoginTime;
	data['sex'] = entity.sex;
	data['avatar'] = entity.avatar;
	data['isSystem'] = entity.isSystem;
	data['description'] = entity.description;
	data['type'] = entity.type;
	data['sign'] = entity.sign;
	data['createDate'] = entity.createDate;
	data['updateDate'] = entity.updateDate;
	data['createBy'] = entity.createBy;
	data['updateBy'] = entity.updateBy;
	data['departmentId'] = entity.departmentId;
	data['isViewAll'] = entity.isViewAll;
	data['companyCode'] = entity.companyCode;
	data['areaCode'] = entity.areaCode;
	data['roleId'] = entity.roleId;
	data['roleName'] = entity.roleName;
	return data;
}